<?php
namespace app\app\controller;
use \app\app\controller\Base;
use \think\Db;
class Lawyer extends Base
{
    public function index()
    {
		$lawyer=Db::name("lawyer")->order(["id"=>"desc"])->paginate(6);
		$this->assign("lawyer",$lawyer);
		$this->assign("page",$lawyer->render());
		// var_dump($news->render());
        return $this->fetch();
    }

    //律师详情页
    public function info(){
    	// 新闻
        $lawyer=Db::name('lawyer')->where('id',$this->request->param('id'))->find();
        $this->assign('lawyer',$lawyer);
		// var_dump($lawyer);
    	// $this->assign('menu','3');
    	// $this->assign('_title',"新s闻详情");
        return $this->fetch();
    }
	
	//律师案例
	public function lawyer_case(){
		$case=Db::name("lawyer_case")->where("lawyer_id",$this->request->param("lawyer_id"))->order("id","desc")->limit(4)->select();
		$this->assign('case',$case);
		// var_dump($lawyer);
    	// $this->assign('menu','3');
    	// $this->assign('_title',"新s闻详情");
        return $this->fetch();
	}
}
